﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WF.DAL;
using WF.Common;

namespace WF.Model
{
    public class Module
    {
        public Module(string moduleName, List<Operate> operates)
        {
            _moduleName = moduleName;

            _operates = new List<OperateEntity>();
            foreach (var item in operates)
            {
                OperateEntity operate = new OperateEntity(item);
                _operates.Add(operate);
            }
        }

        private string _moduleName;

        public string ModuleName
        {
            get { return _moduleName; }
            set { _moduleName = value; }
        }
        private List<OperateEntity> _operates;

        public List<OperateEntity> Operates
        {
            get { return _operates; }
            set { _operates = value; }
        }
    }

    public class ModuleOpearateAuthItem
    {
        private string _moduleName;

        public string ModuleName
        {
            get { return _moduleName; }
            set { _moduleName = value; }
        }

        private string _operateID;

        public string OperateID
        {
            get { return _operateID; }
            set { _operateID = value; }
        }
        private string _operateName;

        public string OperateName
        {
            get { return _operateName; }
            set { _operateName = value; }
        }
        private bool isAuth;

        public bool IsAuth
        {
            get { return isAuth; }
            set { isAuth = value; }
        }

        private short deptRelate;

        public short DeptRelate
        {
            get { return deptRelate; }
            set { deptRelate = value; }
        }

        private AuthDeptRange deptRange;

        public AuthDeptRange DeptRange
        {
            get { return deptRange; }
            set { deptRange = value; }
        }
    }
}
